<?php $this->load->view('inc/header'); ?>
<!--content1-->

<div class="grid_12" style="background-color:#CCCCCC;">
  <!--เมนูข้าง-->
  <div class="grid_4 alpha" style="margin-top:10px;">
    <div id="side-panel-top">
      <div style="padding-left: 22px; padding-top: 11px; font-weight: bold;   color:#FF9933; text-shadow: 1px 1px 1px rgb(255, 255, 255);">Management</div>
    </div>
    <div id="side-panel-middle" style="padding-left: 22px;">
      <ul id="browser" class="filetree">
        <li class="closed"><img src="<?=base_url()?>images/graphic/sitemap-application-blue.png" /> <span>Organization</span>
          <ul>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/users.png" /><span> <a href="<?=base_url()?>administrator/org/manage-staff">Manage Staff</a></span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/folder-open-document.png" /><span> <a href="<?=base_url()?>administrator/org/manage-news">Manage Content</a></span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/table-sum.png" /><span> <a href="<?=base_url()?>administrator/org/statistics">Statistics</a></span></li>
          </ul>
        </li>
        <li class="closed"><img src="<?=base_url()?>images/graphic/balloon-twitter-retweet.png" /> <span>CopS</span>
          <ul>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/link.png" /><span> Manage Staff</span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/folder-open-document.png" /><span> Manage Content</span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/table-sum.png" /><span> Statistics</span></li>
          </ul>
        </li>
        <li class="closed"><img src="<?=base_url()?>images/graphic/balloon-quotation.png" /> <span>Blogs</span>
          <ul>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/link.png" /><span> Manage Staff</span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/folder-open-document.png" /><span> Manage Content</span></li>
            <li>&nbsp;<img src="<?=base_url()?>images/graphic/table-sum.png" /><span> Statistics</span></li>
          </ul>
        </li>
        <li class="closed"> this is closed! <img src="<?=base_url()?>images/folder.gif" />
          <ul>
            <li><img src="<?=base_url()?>images/file.gif" /></li>
          </ul>
        </li>
        <li><img src="<?=base_url()?>images/file.gif" /></li>
      </ul>
    </div>
    <div id="side-panel-bottom"></div>
    <!--เมนูข้าง-->
    <div class="grid_4 alpha" style="margin-top:8px;">
      <div id="side-panel-top">
        <div style="padding-left: 22px; padding-top: 11px; font-weight: bold;   color:#FF9933; text-shadow: 1px 1px 1px rgb(255, 255, 255);">Search</div>
      </div>
      <div id="side-panel-middle"> dsf</div>
      <div id="side-panel-bottom"></div>
    </div>
    <!--ปิดเมนูข้าง-->
  </div>
  <!--ปิดเมนูข้าง-->
  <div class="grid_8 omega" style="margin-top:10px;">
    <div id="km-topic">
      <div style="padding-left: 19px; padding-top: 11px; color: rgb(0, 0, 0); font-weight: bold; text-shadow: 1px 1px 1px rgb(255, 255, 255);">
        <?=$topic?>
      </div>
    </div>
    <div id="km-new-middle" style="height:auto;">
      <div id="s_header" style="width:550px;">
        <h3>Choose staff of organization</h3>
        <hr/>
      </div>
      <div id="s_organization"> <span id="orgnaization_name">
        <ol>
          <?php 
		  	//$this->db->join('membership','membership.member_id=organization.staff_id');
			$query = $this->db->get('organization');
			foreach($query->result() as $rows)
			{
				$org_id = $rows->org_id;
				$org_name = $rows->org_name;
				$org_description = $rows->org_description;
				$staff_id = $rows->staff_id;
		?>
          <li style="background-color:#F2F2F2; padding:10px; width:540px;"><img src="<?=base_url()?>images/arrow-bullet.jpg"/>&nbsp;
            <?=$org_name?>
            <span id="organization_desc">&nbsp;(
            <?=$org_description?>
            )</span>
            <hr/>
            <?php
				if(!isset($staff_id))
				{
					echo "no staff";
				}
				else
				{
					$this->db->where('member_id',$staff_id);
					$query = $this->db->get('membership');
					if($query->num_row = 0){
						echo "no staff";
					}
					else
					{
						foreach($query->result() as $rows)
						{
				?>
                	<img src="<?=base_url()?>images/graphic/user_business.png"/>
               <?php 			
							echo $rows->firstname."&nbsp;".$rows->lastname;
						}
					}
				}
			?>
     
            <span id="choose-staff-but">
            <a href="<?=base_url()?>administrator/org/manage-staff/choose-staff-for/<?=$org_name?>/<?=$org_id?>" style="-moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px;
border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background:#FF9900; padding:3px; color:#FFFFFF; text-decoration:none;">choose staff for <?=$org_name?> ?</a>
            </span>
            
            </li>
          <div id="spacer">&nbsp;</div>
          <?php
			} //end foreach
		?>
        </ol>
          </span></div>
    </div>
    <div id="km-new-bottom"></div>
  </div>
</div>
<div class="clear"></div>
<!--end content1-->
<div class="grid_12" style="background-color:#CCCCCC;">&nbsp;</div>
<div class="clear"></div>
<?php $this->load->view('inc/footer'); ?>
